import request from "@/utils/request";
enum API{
    LOGIN_URL='/user/login',
    FRIENDSINFO='/user/friendsInfo',
    FRIENDINFO='/user/userInfo',
    GETNEWFRIENDS='/user/newfriends',
    SEARCHUSERS='user/searchUsers',
    ADDFRIEND='user/addfriend',
    DELETEFRIEND='user/deletefriend'
}
export const reqLogin=(data:any)=>{
   return request.post<any,any>(API.LOGIN_URL,data)
}
// 获取所有好友
export const reqUserInfo=(data:any)=>{
    return request.post<any,any>(API.FRIENDSINFO,data)
}
// 查询一个用户信息
export const reqOneUserInfo=(userId:any)=>{
    return request.post<any,any>(API.FRIENDINFO,{userId})
}
// 获取好友申请信息
export const reqNewFriends=(userId:any)=>{
    return request.post<any,any>(API.GETNEWFRIENDS,{userId})
}
// 查询全部用户
export const reqAllUser=(data:any)=>{
    return request.post<any,any>(API.SEARCHUSERS,data)
}
// 发生添加好友申请
export const reqAddfriend=(data:any)=>{
    return request.post<any,any>(API.ADDFRIEND,data)
}
// 删除好友
// 发生添加好友申请
export const reqDeletefriend=(data:any)=>{
    return request.post<any,any>(API.DELETEFRIEND,data)
}